#pragma once
#include "epoll.h"

class CTransferServer : public CEpollServer
{
public:
	CTransferServer(const char* socks5ServerIp, int socks5ServerPort,  int selfPort = 8800)
		:CEpollServer(selfPort)
	{
    memset(&_socks5addr, 0, sizeof(struct sockaddr_in));
		_socks5addr.sin_family = AF_INET;
		_socks5addr.sin_port = htons(socks5ServerPort);
		_socks5addr.sin_addr.s_addr = inet_addr(socks5ServerIp);
	}

	virtual void _DoConnectEventHandle(int connectfd);
	virtual void _DoReadEventHandle(int connectfd);

protected:
	struct sockaddr_in _socks5addr;
};
